import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path';
export default defineConfig({
  
  plugins: [vue()],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src')
    }
  },
  server: { //主要是加上这段代码
    port: 3000,
    proxy: {
      '/api': {
        target: 'http://43.153.58.136:8080',	//实际请求地址
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, '')
      },
      '/meng': {
        target: 'https://api-seller.ozon.ru',	//实际请求地址
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/meng/, '')
      },
    }
  }


})
  
